import request from "@/utils/request";

// 查询商品列表
export function productList(query) {
  return request({
    url: "/store/product/list",
    method: "get",
    params: query,
  });
}

// 新增商品
export function insertProduct(data) {
  return request({
    url: "/store/product/add",
    method: "post",
    data: data,
  });
}

// 查询商品详细
export function detailProduct(id) {
  return request({
    url: "/store/product/detail/" + id,
    method: "get",
  });
}

// 修改商品
export function modifyProduct(data) {
  return request({
    url: "/store/product/update",
    method: "post",
    data: data,
  });
}

// 删除商品
export function delProduct(id) {
  return request({
    url: "/store/product/remove/" + id,
    method: "get",
  });
}
// 上下架商品
export function productStatus(data) {
  return request({
    url: "/store/product/status",
    method: "post",
    data: data,
  });
}
